require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/userA/orders" ], {
    "134a": function(t, n, a) {
        (function(i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }), n.default = void 0;
            var t, r = (t = a("a34a")) && t.__esModule ? t : {
                default: t
            };
            function u(t, e, n, r, a, i, s) {
                try {
                    var d = t[i](s), u = d.value;
                } catch (t) {
                    return n(t), 0;
                }
                d.done ? e(u) : Promise.resolve(u).then(r, a);
            }
            var s = getApp(), e = {
                data: function() {
                    return {
                        search: 0,
                        keyword: "",
                        show_select: !1,
                        show_calendar: !1,
                        date_range_start: "",
                        date_range_end: "",
                        date_range_color: "#8c8c8c",
                        fillter_color: "#8c8c8c",
                        search_color: "#8c8c8c",
                        list: [],
                        load: 1,
                        module_name: s.globalData.module_name,
                        userinfo: i.getStorageSync("userinfo"),
                        setting: i.getStorageSync("setting"),
                        min_date: i.getStorageSync("setting").wdsy_min_date,
                        cpsType: "",
                        navItem: [ "全部", "已付款", "已收货", "已结算", "已失效" ],
                        currentTabIndex: 0,
                        currentOrderType: "mine",
                        multiOrderList: [ [], [], [], [], [] ],
                        pageSize: 10,
                        orderStatus: 0,
                        currentEndStatus: "loading",
                        pageRecord: {
                            mine: [ {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            } ],
                            team: [ {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            } ]
                        },
                        type: "",
                        reachBottom: "more",
                        default_value: [ 0 ]
                    };
                },
                computed: {
                    last: function() {
                        return this.multiOrderList[this.currentTabIndex].length - 1;
                    },
                    btnBg: function(t) {
                        return function(t) {
                            var e = "";
                            switch (t) {
                              case "已付款":
                              case "已收货":
                                e = "#FF4167";
                                break;

                              case "已失效":
                              case "已退款":
                              case "已取消":
                                e = "#C6C6C6";
                                break;

                              case "已结算":
                                e = "#FF9D3E";
                            }
                            return e;
                        };
                    },
                    goodsLoad: function() {
                        return 0 == this.multiOrderList[this.currentTabIndex].length && "暂无数据哦";
                    }
                },
                onShow: function() {},
                onPageScroll: function(t) {
                    this.pageRecord[this.currentOrderType][this.currentTabIndex].distance = t.scrollTop;
                },
                onReachBottom: function() {
                    "end" !== this.reachBottom && (this.pageRecord[this.currentOrderType][this.currentTabIndex].page++, 
                    this.getOrderList(this.currentTabIndex, 0));
                },
                onLoad: function(t) {
                    var d, n = this;
                    return d = r.default.mark(function t() {
                        var e;
                        return r.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, n.$onLaunched;

                              case 2:
                                (e = n).setting = i.getStorageSync("setting"), e.userinfo = i.getStorageSync("userinfo"), 
                                n.module_name = s.globalData.module_name, e.min_date = e.setting.wdsy_min_date, 
                                n.getOrderList(0, 0), n.type, i.setNavigationBarTitle({
                                    title: "我的订单"
                                });

                              case 11:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }), function() {
                        var t = this, s = arguments;
                        return new Promise(function(e, n) {
                            var r = d.apply(t, s);
                            function a(t) {
                                u(r, e, n, a, i, "next", t);
                            }
                            function i(t) {
                                u(r, e, n, a, i, "throw", t);
                            }
                            a(void 0);
                        });
                    }();
                },
                methods: {
                    search_icon: function(t) {
                        this.search = 1;
                    },
                    search_do: function(t) {
                        this.search_color = t ? "#fc2628" : "#8c8c8c", this.keyword = t, this.search = 0, 
                        this.currentTabIndex = 0, this.currentOrderType = "mine", this.multiOrderList = [ [], [], [], [], [] ], 
                        this.pageSize = 10, this.orderStatus = 0, this.currentEndStatus = "loading", this.pageRecord = {
                            mine: [ {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            } ],
                            team: [ {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            } ]
                        }, this.getOrderList(0, 0);
                    },
                    calendar: function(t) {
                        this.show_calendar = !0;
                    },
                    calendar_change: function(t) {
                        this.date_range_color = "#fc2628", this.date_range_start = t.startDate, this.date_range_end = t.endDate, 
                        this.currentTabIndex = 0, this.currentOrderType = "mine", this.multiOrderList = [ [], [], [], [], [] ], 
                        this.pageSize = 10, this.orderStatus = 0, this.currentEndStatus = "loading", this.pageRecord = {
                            mine: [ {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            } ],
                            team: [ {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            } ]
                        }, this.getOrderList(0, 0);
                    },
                    fillter: function(t) {
                        this.show_select = !0;
                    },
                    confirm: function(t) {
                        console.log(t), "" == t[0].value ? (this.default_value = [ 0 ], this.fillter_color = "#8c8c8c") : this.fillter_color = "#fc2628", 
                        this.type = t[0].value, this.type ? i.setNavigationBarTitle({
                            title: this.type + "订单"
                        }) : i.setNavigationBarTitle({
                            title: "我的订单"
                        }), this.currentTabIndex = 0, this.currentOrderType = "mine", this.multiOrderList = [ [], [], [], [], [] ], 
                        this.pageSize = 10, this.orderStatus = 0, this.currentEndStatus = "loading", this.pageRecord = {
                            mine: [ {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            } ],
                            team: [ {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            }, {
                                page: 1,
                                list: [],
                                isEmpty: !1,
                                endStatus: null,
                                distance: 0
                            } ]
                        }, this.getOrderList(0, 0);
                    },
                    opengoods: function(t) {
                        "movie" != t.currentTarget.dataset.pingtai && "jutuike" != t.currentTarget.dataset.pingtai && t.currentTarget.dataset.goodsid ? i.navigateTo({
                            url: "../mallA/detail?pt=" + t.currentTarget.dataset.pingtai + "&goodsid=" + t.currentTarget.dataset.goodsid
                        }) : "movie" == t.currentTarget.dataset.pingtai && 1 == t.currentTarget.dataset.orderself && i.navigateTo({
                            url: "movieorderdetail?id=" + t.currentTarget.dataset.orderid
                        });
                    },
                    toggleOrderType: function(t) {
                        this.currentOrderType = t, this.getOrderList(this.currentTabIndex, 1);
                    },
                    toggleOrderStatus: function(t) {
                        this.currentTabIndex = t, this.getOrderList(t, 1);
                    },
                    getOrderList: function(t, e) {
                        var n, r, a = this;
                        if (1 == e) {
                            if ("end" == a.pageRecord[a.currentOrderType][a.currentTabIndex].endStatus || "more" == a.pageRecord[a.currentOrderType][a.currentTabIndex].endStatus) return a.multiOrderList[a.currentTabIndex] = a.pageRecord[a.currentOrderType][a.currentTabIndex].list, 
                            a.orderStatus = a.pageRecord[a.currentOrderType][a.currentTabIndex].isEmpty, void (a.reachBottom = a.pageRecord[a.currentOrderType][a.currentTabIndex].endStatus);
                            a.multiOrderList[a.currentTabIndex] = a.pageRecord[a.currentOrderType][a.currentTabIndex].list, 
                            a.orderStatus = a.pageRecord[a.currentOrderType][a.currentTabIndex].isEmpty, a.reachBottom = a.pageRecord[a.currentOrderType][a.currentTabIndex].endStatus;
                        }
                        "end" != this.pageRecord[this.currentOrderType][this.currentTabIndex].endStatus && (i.showLoading({
                            title: "加载中...",
                            mask: !1
                        }), n = a.pageRecord[a.currentOrderType][a.currentTabIndex], r = s.globalData.util.url("entry/wxapp/orders3", {
                            m: s.globalData.module_name
                        }), e = {
                            openid: i.getStorageSync("openid"),
                            page: n.page,
                            pageSize: a.pageSize,
                            orderStatus: a.currentTabIndex,
                            type: a.type,
                            ordertype: a.currentOrderType,
                            load: a.load,
                            date_range_start: a.date_range_start,
                            date_range_end: a.date_range_end,
                            keyword: a.keyword
                        }, i.request({
                            url: r,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: e,
                            success: function(t) {
                                1 == a.load && (a.list = t.data.income_type), (a.load = 0) == t.data.data.length ? 0 < a.pageRecord[a.currentOrderType][a.currentTabIndex].list.length ? (a.orderStatus = 1, 
                                a.reachBottom = "end", a.pageRecord[a.currentOrderType][a.currentTabIndex].endStatus = "end", 
                                a.pageRecord[a.currentOrderType][a.currentTabIndex].isEmpty = 1) : (a.orderStatus = 0, 
                                a.reachBottom = null, a.pageRecord[a.currentOrderType][a.currentTabIndex].endStatus = null, 
                                a.pageRecord[a.currentOrderType][a.currentTabIndex].isEmpty = 0, a.multiOrderList[a.currentTabIndex] = []) : (a.orderStatus = t.data.data.length, 
                                n.list = n.list.concat(t.data.data), a.multiOrderList[a.currentTabIndex] = n.list, 
                                a.pageRecord[a.currentOrderType][a.currentTabIndex].endStatus = t.data.data.length < a.pageSize ? "end" : "more", 
                                a.pageRecord[a.currentOrderType][a.currentTabIndex].isEmpty = t.data.data.length, 
                                a.reachBottom = t.data.data.length < a.pageSize ? "end" : "more"), setTimeout(function() {
                                    i.pageScrollTo({
                                        scrollTop: a.pageRecord[a.currentOrderType][a.currentTabIndex].distance,
                                        duration: 0
                                    });
                                }, 0), i.hideLoading();
                            }
                        }));
                    }
                }
            };
            n.default = e;
        }).call(this, a("543d").default);
    },
    "311d": function(t, e, n) {
        n.r(e);
        var r, a = n("134a"), i = n.n(a);
        for (r in a) "default" !== r && function(t) {
            n.d(e, t, function() {
                return a[t];
            });
        }(r);
        e.default = i.a;
    },
    4862: function(t, e, n) {
        (function(t) {
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            n("0cda"), e(n("66fd")), t(e(n("fda9")).default);
        }).call(this, n("543d").createPage);
    },
    "6de3": function(t, e, n) {
        var r = n("f901");
        n.n(r).a;
    },
    8711: function(t, e, n) {
        n.d(e, "b", function() {
            return a;
        }), n.d(e, "c", function() {
            return i;
        }), n.d(e, "a", function() {
            return r;
        });
        var r = {
            uSticky: function() {
                return n.e("uview-ui/components/u-sticky/u-sticky").then(n.bind(null, "fefb"));
            },
            uIcon: function() {
                return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null, "bee6"));
            },
            uSearch: function() {
                return n.e("uview-ui/components/u-search/u-search").then(n.bind(null, "6bb4"));
            },
            uEmpty: function() {
                return n.e("uview-ui/components/u-empty/u-empty").then(n.bind(null, "b399"));
            },
            uSelect: function() {
                return n.e("uview-ui/components/u-select/u-select").then(n.bind(null, "b869"));
            },
            uCalendar: function() {
                return n.e("uview-ui/components/u-calendar/u-calendar").then(n.bind(null, "304b"));
            }
        }, a = function() {
            var n = this, t = (n.$createElement, n._self._c, n.__map(n.multiOrderList, function(t, e) {
                return {
                    $orig: n.__get_orig(t),
                    l0: n.__map(n.multiOrderList[n.currentTabIndex], function(t, e) {
                        return {
                            $orig: n.__get_orig(t),
                            m0: n.btnBg(t.orderStatus)
                        };
                    })
                };
            }));
            n.$mp.data = Object.assign({}, {
                $root: {
                    l1: t
                }
            });
        }, i = [];
    },
    f901: function(t, e, n) {},
    fda9: function(t, e, n) {
        n.r(e);
        var r, a = n("8711"), i = n("311d");
        for (r in i) "default" !== r && function(t) {
            n.d(e, t, function() {
                return i[t];
            });
        }(r);
        n("6de3");
        var s = n("f0c5"), a = Object(s.a)(i.default, a.b, a.c, !1, null, null, null, !1, a.a, void 0);
        e.default = a.exports;
    }
}, [ [ "4862", "common/runtime", "common/vendor" ] ] ]);